using System;
using UnityEngine;

namespace Data
{
    [CreateAssetMenu]
    public class GameRoomData : ScriptableObject
    {

        public GameLevel    Level;
        public string       LevelTitle;
        public Vector2Int   Launcher;
        public Vector2Int[] Receiver;
        public Vector2Int[] Obstacle;

        public int Cube1;
        public int Cube2;
        public int Cube3;
        public int Cube4;
        public int Cube5;
        public int Cube6;
        public int Cube7;

        public int GetCubeCount(GameObjectType gameObjectType)
        {
            switch (gameObjectType)
            {
                case GameObjectType.Cube1:
                    return Cube1;
                case GameObjectType.Cube2:
                    return Cube2;
                case GameObjectType.Cube3:
                    return Cube3;
                case GameObjectType.Cube4:
                    return Cube4;
                case GameObjectType.Cube5:
                    return Cube5;
                case GameObjectType.Cube6:
                    return Cube6;
                case GameObjectType.Cube7:
                    return Cube7;
            }
            return 0;
        }
    }


    public enum GameObjectType
    {
        /// <summary>
        /// 发射器
        /// </summary>
        Launcher,

        /// <summary>
        /// 接收器
        /// </summary>
        Receiver,

        /// <summary>
        /// 障碍物
        /// </summary>
        Obstacle,
        Cube1,
        Cube2,
        Cube3,
        Cube4,
        Cube5,
        Cube6,
        Cube7,
    }
}